<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QuaZIP: QuaZipNewInfo Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">QuaZIP&#160;<span id="projectnumber">quazip-0-4-3</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">QuaZipNewInfo Struct Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="QuaZipNewInfo" -->
<p>Information about a file to be created.  
 <a href="structQuaZipNewInfo.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="quazipnewinfo_8h_source.html">quazipnewinfo.h</a>&gt;</code></p>

<p><a href="structQuaZipNewInfo-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a46c0f551cf9e6b2131929beb39187aac">QuaZipNewInfo</a> (const QString &amp;<a class="el" href="structQuaZipNewInfo.html#a2bdef01b6ac3326e48598e32bfa5fbe8">name</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs <a class="el" href="structQuaZipNewInfo.html" title="Information about a file to be created.">QuaZipNewInfo</a> instance.  <a href="#a46c0f551cf9e6b2131929beb39187aac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#ad47cf11f4277edcb09a8ba2b2963f2a9">QuaZipNewInfo</a> (const QString &amp;<a class="el" href="structQuaZipNewInfo.html#a2bdef01b6ac3326e48598e32bfa5fbe8">name</a>, const QString &amp;file)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs <a class="el" href="structQuaZipNewInfo.html" title="Information about a file to be created.">QuaZipNewInfo</a> instance.  <a href="#ad47cf11f4277edcb09a8ba2b2963f2a9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a2b18b554d056877a2f33ffb9d241ed85">setFileDateTime</a> (const QString &amp;file)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the file timestamp from the existing file.  <a href="#a2b18b554d056877a2f33ffb9d241ed85"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a2bdef01b6ac3326e48598e32bfa5fbe8">name</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File name.  <a href="#a2bdef01b6ac3326e48598e32bfa5fbe8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QDateTime&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#aec7f3ac72c72a2e10b82ad64c2fa3453">dateTime</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File timestamp.  <a href="#aec7f3ac72c72a2e10b82ad64c2fa3453"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59ce9776c2ac7547ade8cb4c404c77ab"></a><!-- doxytag: member="QuaZipNewInfo::internalAttr" ref="a59ce9776c2ac7547ade8cb4c404c77ab" args="" -->
quint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a59ce9776c2ac7547ade8cb4c404c77ab">internalAttr</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File internal attributes. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="affd1a9700d302e1395bd04f0864da7d0"></a><!-- doxytag: member="QuaZipNewInfo::externalAttr" ref="affd1a9700d302e1395bd04f0864da7d0" args="" -->
quint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#affd1a9700d302e1395bd04f0864da7d0">externalAttr</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File external attributes. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#ae24b1d38c3550b4724862ffcf8f20924">comment</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File comment.  <a href="#ae24b1d38c3550b4724862ffcf8f20924"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab377a81c51cf495c7aeee4f19340a43f"></a><!-- doxytag: member="QuaZipNewInfo::extraLocal" ref="ab377a81c51cf495c7aeee4f19340a43f" args="" -->
QByteArray&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#ab377a81c51cf495c7aeee4f19340a43f">extraLocal</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File local extra field. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abda207eb3949db3a88761c1b06e6bd58"></a><!-- doxytag: member="QuaZipNewInfo::extraGlobal" ref="abda207eb3949db3a88761c1b06e6bd58" args="" -->
QByteArray&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#abda207eb3949db3a88761c1b06e6bd58">extraGlobal</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File global extra field. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ulong&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a18c079b3f2f5ab6eecdd61d6dbe93be6">uncompressedSize</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Uncompressed file size.  <a href="#a18c079b3f2f5ab6eecdd61d6dbe93be6"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Information about a file to be created. </p>
<p>This structure holds information about a file to be created inside ZIP archive. At least name should be set to something correct before passing this structure to QuaZipFile::open(OpenMode,const QuaZipNewInfo&amp;,int,int,bool). </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a46c0f551cf9e6b2131929beb39187aac"></a><!-- doxytag: member="QuaZipNewInfo::QuaZipNewInfo" ref="a46c0f551cf9e6b2131929beb39187aac" args="(const QString &amp;name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QuaZipNewInfo::QuaZipNewInfo </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs <a class="el" href="structQuaZipNewInfo.html" title="Information about a file to be created.">QuaZipNewInfo</a> instance. </p>
<p>Initializes name with <em>name</em>, dateTime with current date and time. Attributes are initialized with zeros, comment and extra field with null values. </p>

</div>
</div>
<a class="anchor" id="ad47cf11f4277edcb09a8ba2b2963f2a9"></a><!-- doxytag: member="QuaZipNewInfo::QuaZipNewInfo" ref="ad47cf11f4277edcb09a8ba2b2963f2a9" args="(const QString &amp;name, const QString &amp;file)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QuaZipNewInfo::QuaZipNewInfo </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>file</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs <a class="el" href="structQuaZipNewInfo.html" title="Information about a file to be created.">QuaZipNewInfo</a> instance. </p>
<p>Initializes name with <em>name</em> and dateTime with timestamp of the file named <em>file</em>. If the <em>file</em> does not exists or its timestamp is inaccessible (e. g. you do not have read permission for the directory file in), uses current date and time. Attributes are initialized with zeros, comment and extra field with null values.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="structQuaZipNewInfo.html#a2b18b554d056877a2f33ffb9d241ed85" title="Sets the file timestamp from the existing file.">setFileDateTime()</a> </dd></dl>

<p>References <a class="el" href="structQuaZipNewInfo.html#aec7f3ac72c72a2e10b82ad64c2fa3453">dateTime</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a2b18b554d056877a2f33ffb9d241ed85"></a><!-- doxytag: member="QuaZipNewInfo::setFileDateTime" ref="a2b18b554d056877a2f33ffb9d241ed85" args="(const QString &amp;file)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QuaZipNewInfo::setFileDateTime </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>file</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the file timestamp from the existing file. </p>
<p>Use this function to set the file timestamp from the existing file. Use it like this: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classQuaZipFile.html" title="A file inside ZIP archive.">QuaZipFile</a> zipFile(&amp;zip);
 QFile file(<span class="stringliteral">&quot;file-to-add&quot;</span>);
 file.open(QIODevice::ReadOnly);
 <a class="code" href="structQuaZipNewInfo.html" title="Information about a file to be created.">QuaZipNewInfo</a> info(<span class="stringliteral">&quot;file-name-in-archive&quot;</span>);
 info.setFileDateTime(<span class="stringliteral">&quot;file-to-add&quot;</span>); <span class="comment">// take the timestamp from file</span>
 zipFile.open(QIODevice::WriteOnly, info);
</pre></div><p>This function does not change dateTime if some error occured (e. g. file is inaccessible). </p>

<p>References <a class="el" href="structQuaZipNewInfo.html#aec7f3ac72c72a2e10b82ad64c2fa3453">dateTime</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a2bdef01b6ac3326e48598e32bfa5fbe8"></a><!-- doxytag: member="QuaZipNewInfo::name" ref="a2bdef01b6ac3326e48598e32bfa5fbe8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString <a class="el" href="structQuaZipNewInfo.html#a2bdef01b6ac3326e48598e32bfa5fbe8">QuaZipNewInfo::name</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>File name. </p>
<p>This field holds file name inside archive, including path relative to archive root. </p>

<p>Referenced by <a class="el" href="classQuaZipFile.html#a2429ea59c77371d7af56d739db130b18">QuaZipFile::open()</a>.</p>

</div>
</div>
<a class="anchor" id="aec7f3ac72c72a2e10b82ad64c2fa3453"></a><!-- doxytag: member="QuaZipNewInfo::dateTime" ref="aec7f3ac72c72a2e10b82ad64c2fa3453" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QDateTime <a class="el" href="structQuaZipNewInfo.html#aec7f3ac72c72a2e10b82ad64c2fa3453">QuaZipNewInfo::dateTime</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>File timestamp. </p>
<p>This is the last file modification date and time. Will be stored in the archive central directory. It is a good practice to set it to the source file timestamp instead of archive creating time. Use <a class="el" href="structQuaZipNewInfo.html#a2b18b554d056877a2f33ffb9d241ed85" title="Sets the file timestamp from the existing file.">setFileDateTime()</a> or <a class="el" href="structQuaZipNewInfo.html#ad47cf11f4277edcb09a8ba2b2963f2a9" title="Constructs QuaZipNewInfo instance.">QuaZipNewInfo(const QString&amp;, const QString&amp;)</a>. </p>

<p>Referenced by <a class="el" href="classQuaZipFile.html#a2429ea59c77371d7af56d739db130b18">QuaZipFile::open()</a>, <a class="el" href="structQuaZipNewInfo.html#ad47cf11f4277edcb09a8ba2b2963f2a9">QuaZipNewInfo()</a>, and <a class="el" href="structQuaZipNewInfo.html#a2b18b554d056877a2f33ffb9d241ed85">setFileDateTime()</a>.</p>

</div>
</div>
<a class="anchor" id="ae24b1d38c3550b4724862ffcf8f20924"></a><!-- doxytag: member="QuaZipNewInfo::comment" ref="ae24b1d38c3550b4724862ffcf8f20924" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString <a class="el" href="structQuaZipNewInfo.html#ae24b1d38c3550b4724862ffcf8f20924">QuaZipNewInfo::comment</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>File comment. </p>
<p>Will be encoded using <a class="el" href="classQuaZip.html#a008260161781d8b5d2a0a28493fddaf4" title="Returns the codec used to encode/decode comments inside archive.">QuaZip::getCommentCodec()</a>. </p>

<p>Referenced by <a class="el" href="classQuaZipFile.html#a2429ea59c77371d7af56d739db130b18">QuaZipFile::open()</a>.</p>

</div>
</div>
<a class="anchor" id="a18c079b3f2f5ab6eecdd61d6dbe93be6"></a><!-- doxytag: member="QuaZipNewInfo::uncompressedSize" ref="a18c079b3f2f5ab6eecdd61d6dbe93be6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ulong <a class="el" href="structQuaZipNewInfo.html#a18c079b3f2f5ab6eecdd61d6dbe93be6">QuaZipNewInfo::uncompressedSize</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Uncompressed file size. </p>
<p>This is only needed if you are using raw file zipping mode, i. e. adding precompressed file in the zip archive. </p>

<p>Referenced by <a class="el" href="classQuaZipFile.html#a2429ea59c77371d7af56d739db130b18">QuaZipFile::open()</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>quazip/<a class="el" href="quazipnewinfo_8h_source.html">quazipnewinfo.h</a></li>
<li>quazip/quazipnewinfo.cpp</li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Sep 9 2011 20:02:34 for QuaZIP by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
